package com.sx.wechat.controller.teacher;

import com.sx.core.dao.AllScoreMapper;
import com.sx.core.dao.PartScoreMapper;
import com.sx.core.vo.JsonReaderResponse;
import com.sx.wechat.controller.BaseController;
import com.sx.wechat.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by lihao on 2017/6/29.
 */
@RequestMapping("tc/score")
@RestController
public class ScoreController extends BaseController {
    @Autowired
    AllScoreMapper allScoreMapper;
    @Autowired
    PartScoreMapper partScoreMapper;



    @Autowired
    OrderService orderService;

    @RequestMapping("get_stu_all_score")
    public JsonReaderResponse list_lab(String stuid,String orderid) {
        return new JsonReaderResponse().addExtra(allScoreMapper.getAllScoreByOrderId(stuid, orderid));
    }

    @RequestMapping("list_stu_part_score")
    public JsonReaderResponse list_stu_part_score(String stuid,String orderid) {
        return new JsonReaderResponse(partScoreMapper.listScoreByOrderId(stuid, orderid));
    }



}
